<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>All Vehicle Types</title>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
                <h:dataTable value="#{vehicleType.vehicleTypes}" border="1" var="vehicleType">
                    <f:facet name="header">
                        <h:outputText value="List of VehicleTypes"/>
                    </f:facet>
                    <h:column id="column1">
                        <f:facet name="header">
                            <h:outputText value="ID"/>
                        </f:facet>
                        <h:outputText value="#{vehicleType.id}"/>
                    </h:column>
                    <h:column id="column2">
                        <f:facet name="header">
                            <h:outputText value="Name"/>
                        </f:facet>
                        <h:outputText value="#{vehicleType.name}"/>
                    </h:column>
                    <h:column id="column3">
                        <f:facet name="header">
                            <h:outputText value="Number of seats"/>
                        </f:facet>
                        <h:outputText value="#{vehicleType.numOfSeats}"/>
                    </h:column>
                    <h:column id="column4">
                        <f:facet name="header">
                            <h:outputText value="Edit"/>
                        </f:facet>
                        <h:commandButton value="Edit" action="#{vehicleType.editVehicleType}" />
                    </h:column>
                    <h:column id="column5">
                        <f:facet name="header">
                            <h:outputText value="Delete"/>
                        </f:facet>
                        <h:commandButton value="Delete" action="#{vehicleType.deleteVehicleType}" />
                    </h:column>
                </h:dataTable>
                <br/>
                <h:commandButton value="Return" action="adminHome"/>
            </h:form>
        </f:view>
    </h:body>
</html>

